package com.project.controller;

import com.project.bean.GradeBean;
import com.project.service.IGradeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 权限控制器
 */
@RestController
@RequestMapping("grade")
public class GradeController {
    @Autowired
    private IGradeService gradeService;
    @RequestMapping("findAllGrade")
    @RequiresPermissions("user:am")
    public List<GradeBean> findAllGrade(){
        return gradeService.findAllGrade();
    }
}
